<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Netkk.Models.LinkModel>" %>
<%@ Import Namespace="Netkk.Core"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Links erstellen - .NET-Stammtisch Konstanz-Kreuzlingen</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Links erstellen</h1>
    <%= Html.ValidationSummary() %>
    <% using (Html.BeginForm("Create", "Link", FormMethod.Post, new Dictionary<string, object> { { "name", "mainform" } }))
       {%>
    <dl class="forms">
        <dt>
            <label for="Name">
                Name:</label></dt>
        <dd>
            <%= Html.TextBox("Name")%>
            <%= Html.ValidationMessage("Name", "*")%>
        </dd>
        <dt>
            <label for="Url">
                Url:</label></dt>
        <dd>
            <%= Html.TextBox("Url")%>
            <%= Html.ValidationMessage("Url", "*")%>
        </dd>
        <dt class="ta">
            <label for="Description">
                Kurzbeschreibung:</label></dt>
        <dd class="ta">
            <%= Html.TextArea("Description")%>
            <%= Html.ValidationMessage("Description", "*")%>
        </dd>
        <dt>
            <label for="Category">
                Kategorie:</label></dt>
        <dd>
            <%= Html.TextBox("Category")%>
            <%= Html.ValidationMessage("Category", "*")%>
        </dd>
        <dt></dt>
        <dd>
            <a href="javascript:void(0);" onclick="document.forms['mainform'].submit();" class="save button"><span>Speichern</span></a>
            <a href="<%=Html.Action("Link","ShowCategory", Model.Category) %>" class="cancel button"><span>Abbrechen</span></a>
        </dd>
    </dl>
    <% } %>
    <script type="text/javascript">
        $(document).ready(function()
        {
            $('#Description').wysiwyg();
        });
    </script>
</asp:Content>
